<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>bkn.bibtex.bibliography.Bibliography</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="bkn.bibtex-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/bibkn/">bkn.bibtex</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;bkn ::
        <a href="bkn.bibtex-module.html">Package&nbsp;bibtex</a> ::
        <a href="bkn.bibtex.bibliography-module.html">Module&nbsp;bibliography</a> ::
        Class&nbsp;Bibliography
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="bkn.bibtex.bibliography.Bibliography-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Bibliography</h1><p class="nomargin-top"><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography">source&nbsp;code</a></span></p>
<p>A bibliography class with methods to load BibTeX data.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr bgcolor="#e8f0f8" >
  <th colspan="2" class="group-header"
    >&nbsp;&nbsp;&nbsp;&nbsp;Methods for initializing Bibliography instances</th></tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">id</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">file</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">string</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">format</span>=<span class="summary-sig-default">u'bibtex'</span>,
        <span class="summary-sig-arg">dlist</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">preamble</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">metadata</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">entries</span>=<span class="summary-sig-default">None</span>)</span><br />
      Initializes a new Bibliography instance.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#load_from_file" class="summary-sig-name">load_from_file</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">file</span>,
        <span class="summary-sig-arg">format</span>=<span class="summary-sig-default">'bibtex'</span>)</span><br />
      Loads bibliography entries from a file in the specified format.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.load_from_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#load_from_string" class="summary-sig-name">load_from_string</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">string</span>,
        <span class="summary-sig-arg">format</span>=<span class="summary-sig-default">'bibtex'</span>)</span><br />
      Loads bibliography entries from a string in the specified format.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.load_from_string">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#load_from_dlist" class="summary-sig-name">load_from_dlist</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dlist</span>)</span><br />
      Loads bibliography entries from a list of dictionaries.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.load_from_dlist">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#_load_from_bibtex_file" class="summary-sig-name" onclick="show_private();">_load_from_bibtex_file</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">file</span>,
        <span class="summary-sig-arg">encoding</span>=<span class="summary-sig-default">'utf-8'</span>)</span><br />
      Loads records into this bibliography from the specified BibTeX file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography._load_from_bibtex_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#_load_from_BibJSON_file" class="summary-sig-name" onclick="show_private();">_load_from_BibJSON_file</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">file</span>,
        <span class="summary-sig-arg">encoding</span>=<span class="summary-sig-default">'utf-8'</span>)</span><br />
      Loads records into this bibliography from the specified BibJSON file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography._load_from_BibJSON_file">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#_load_from_BibJSON_string" class="summary-sig-name" onclick="show_private();">_load_from_BibJSON_string</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">string</span>)</span><br />
      Loads records into this bibliography from a string in BibJSON format.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography._load_from_BibJSON_string">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#_load_from_bibtex_string" class="summary-sig-name" onclick="show_private();">_load_from_bibtex_string</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">string</span>)</span><br />
      Loads records into this bibliography from a string in BibTeX format.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography._load_from_bibtex_string">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr bgcolor="#e8f0f8" >
  <th colspan="2" class="group-header"
    >&nbsp;&nbsp;&nbsp;&nbsp;Emulating contatiner type</th></tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>int</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#__len__" class="summary-sig-name">__len__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns the number of records in this bibliography.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.__len__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>iterator</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#__iter__" class="summary-sig-name">__iter__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns an iterator over this bibliography's records.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.__iter__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#sort" class="summary-sig-name">sort</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">comparison</span>)</span><br />
      Sort this bibliography, using the supplied comparison.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.sort">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><a href="bkn.bibtex.bibliography.Record-class.html" 
      class="link">Record</a></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#__getitem__" class="summary-sig-name">__getitem__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>)</span><br />
      Allows you to access a record using bracket notation.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.__getitem__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><a href="bkn.bibtex.bibliography.Record-class.html" 
      class="link">Record</a></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#append" class="summary-sig-name">append</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">record</span>)</span><br />
      A synomnym for add_record().</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.append">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#remove" class="summary-sig-name">remove</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">record</span>)</span><br />
      A synonym for remove_record().</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.remove">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><a href="bkn.bibtex.bibliography.Record-class.html" 
      class="link">Record</a></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#add_record" class="summary-sig-name">add_record</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">record</span>,
        <span class="summary-sig-arg">id</span>=<span class="summary-sig-default">None</span>)</span><br />
      Adds a copy of the supplied Record to this bibliography.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.add_record">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#remove_record" class="summary-sig-name">remove_record</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">record</span>)</span><br />
      Removes the supplied Record from the bibliography.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.remove_record">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr bgcolor="#e8f0f8" >
  <th colspan="2" class="group-header"
    >&nbsp;&nbsp;&nbsp;&nbsp;Methods for working with record ids and references</th></tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="assign_numerical_ids"></a><span class="summary-sig-name">assign_numerical_ids</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Assigns sequention numerical local ids to each record in this 
      bibliography.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.assign_numerical_ids">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><a href="bkn.bibtex.bibliography.Record-class.html" 
      class="link">Record</a></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#record_from_id" class="summary-sig-name">record_from_id</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">local_id</span>)</span><br />
      Returns the Record with the given local id.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.record_from_id">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><a href="bkn.bibtex.bibliography.Record-class.html" 
      class="link">Record</a> or <code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#resolve_reference" class="summary-sig-name">resolve_reference</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ref</span>,
        <span class="summary-sig-arg">resolve_local_refs_from_memory</span>=<span class="summary-sig-default">True</span>)</span><br />
      Attempts to resolve the given reference, returning the applicable 
      Record if available.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.resolve_reference">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>str</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#fullref" class="summary-sig-name">fullref</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ref</span>)</span><br />
      Takes a reference, local or global, and returns a global reference.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.fullref">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>list</code> of <a 
      href="bkn.bibtex.bibliography.Record-class.html" 
      class="link">Records</a></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#get_records_same_as" class="summary-sig-name">get_records_same_as</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">id</span>)</span><br />
      Identifies records which represent the same thing by following 
      same-as assertions.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.get_records_same_as">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>str</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#get_unique_id" class="summary-sig-name">get_unique_id</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">prefix</span>=<span class="summary-sig-default">''</span>)</span><br />
      Returns a string for use as an id in this bibliography.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.get_unique_id">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr bgcolor="#e8f0f8" >
  <th colspan="2" class="group-header"
    >&nbsp;&nbsp;&nbsp;&nbsp;Serialization methods</th></tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>str</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#to_bibjson" class="summary-sig-name">to_bibjson</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns the BibJSON serialization of this Bibliography.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.to_bibjson">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>str</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#to_bibtex" class="summary-sig-name">to_bibtex</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns the BibTeX serialization of this Bibliography.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.to_bibtex">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr bgcolor="#e8f0f8" >
  <th colspan="2" class="group-header"
    >&nbsp;&nbsp;&nbsp;&nbsp;Enhancing and modifying Bibliographies</th></tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#set_id" class="summary-sig-name">set_id</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">id</span>)</span><br />
      The preferred way to set this bibliographies id.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.set_id">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>None</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#add_bibtex_output" class="summary-sig-name">add_bibtex_output</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">style</span>=<span class="summary-sig-default">'abbrv'</span>)</span><br />
      For every record, adds a bibtex_out attribute whose contents is the 
      the result of running bibtex on the entry with specified style.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.add_bibtex_output">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr bgcolor="#e8f0f8" >
  <th colspan="2" class="group-header"
    >&nbsp;&nbsp;&nbsp;&nbsp;Other methods</th></tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>bool</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#validate_record" class="summary-sig-name">validate_record</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">record</span>,
        <span class="summary-sig-arg">raise_error</span>=<span class="summary-sig-default">False</span>)</span><br />
      Returns True if the passed record is valid, otherwise returns False.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.validate_record">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>bool</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#values_equal" class="summary-sig-name">values_equal</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span><br />
      Returns true if this Bibliography has the same content as the given 
      Bibliography.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.values_equal">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>str</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns an informal string representation of this record</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>object</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="bkn.bibtex.bibliography.Bibliography-class.html#__getattr__" class="summary-sig-name">__getattr__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span><br />
      Handles attribute access for deprecated attributes and methods.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.__getattr__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== INSTANCE VARIABLES ==================== -->
<a name="section-InstanceVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>dict</code></span>
    </td><td class="summary">
        <a href="bkn.bibtex.bibliography.Bibliography-class.html#id_to_record_index" class="summary-name">id_to_record_index</a><br />
      A dict mapping local ids to entries.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code>list</code></span>
    </td><td class="summary">
        <a name="record_list"></a><span class="summary-name">record_list</span><br />
      A list of the BibEntries in this Bibliography instance.
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">id</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">file</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">string</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">format</span>=<span class="sig-default">u'bibtex'</span>,
        <span class="sig-arg">dlist</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">preamble</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">metadata</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">entries</span>=<span class="sig-default">None</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Initializes a new Bibliography instance.</p>
  <p>To create an empty Bibliography:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>bib = Bibliography()</pre>
  <p>To create a Bibliography from a file:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>bib = Bibliography(file=<span class="py-string">'articles.bib'</span>)</pre>
  <p>or</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>file_handle = codecs.open(<span class="py-string">'articles.bib'</span>, <span class="py-string">'r'</span>, <span class="py-string">'utf-8'</span>)
<span class="py-prompt">&gt;&gt;&gt; </span>bib = Bibliography(file=file_handle)</pre>
  <p>The file may be located on the web:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>bib = Bibliography(file=<span class="py-string">'example.org/books.bib'</span>)</pre>
  <p>To create a Bibliography from a string:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>bibstring = <span class="py-string">&quot;&quot;&quot;</span>
<span class="py-more">... </span><span class="py-string">@article{spam,</span>
<span class="py-more">... </span><span class="py-string">  title = {The Spanish Inquisition},</span>
<span class="py-more">... </span><span class="py-string">  note = {Nobody expects it!}</span>
<span class="py-more">... </span><span class="py-string">}&quot;&quot;&quot;</span>
<span class="py-prompt">&gt;&gt;&gt; </span>bib = Bibliography(string=bibstring)</pre>
  <p>To create a Bibliography from a list of dictionaries:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>d_list = [{u<span class="py-string">'bibtype'</span>:u<span class="py-string">'article'</span>, 
<span class="py-more">... </span>           u<span class="py-string">'citekey'</span>:u<span class="py-string">'spam'</span>,
<span class="py-more">... </span>           u<span class="py-string">'title'</span>:u<span class="py-string">'The Spanish Inquisition'</span>}]
<span class="py-prompt">&gt;&gt;&gt; </span>bib = Bibliography(dlist = d_list)</pre>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>id</code></strong> (str) - an identifier for this bibliography. If this is not supplied an 
          identifier will be generated in an arbitrary manor.</li>
        <li><strong class="pname"><code>file</code></strong> (str or File) - a File object or the location of a file containing a 
          serialization from which this Bibliography should load records.</li>
        <li><strong class="pname"><code>string</code></strong> (str) - a serialization from which this Bibliography should load records.</li>
        <li><strong class="pname"><code>format</code></strong> (str) - the serialization format used by the supplied string or file. 
          Allowed values are 'bibtex' or 'bibjson'.</li>
        <li><strong class="pname"><code>dlist</code></strong> (list) - a list of dictionaries from which this Bibliography should load 
          records.</li>
        <li><strong class="pname"><code>preamble</code></strong> (str) - LaTeX code to be included in the preamble of this bibliography if
          it is serialized in BibTeX format. (The preamble will appear as 
          an attribute of the dataset module when serializing to BibJSON.)</li>
        <li><strong class="pname"><code>metadata</code></strong> (dict) - metadata for this Bibliography. This will be included in the 
          dataset module when serializing BibJSON.</li>
        <li><strong class="pname"><code>entries</code></strong> (list) - a list of Records to be added to this Bibliography.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="load_from_file"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">load_from_file</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">file</span>,
        <span class="sig-arg">format</span>=<span class="sig-default">'bibtex'</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.load_from_file">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Loads bibliography entries from a file in the specified format.</p>
  <p>Loaded BibEntries are appended to any BibEntries already in the 
  Bibliography.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>file</code></strong> (<code>str</code> or <code>File</code>) - Specifies the file to use. May be a file object or a string. If a
          string is used, and it begins with 'http://' the file will be 
          read from the web, otherwise a local file will be used.</li>
        <li><strong class="pname"><code>format</code></strong> (<code>str</code>) - The format in which the bibliographic data has been serialized.</li>
    </ul></dd>
    <dt>Returns: <code>None</code></dt>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'><a href="bkn.bibtex.error.FormatNotSupportedError-class.html">FormatNotSupportedError</a></strong></code> - A FormatNotSupportedError will be raised if the supplied format is 
        not supported.</li>
    </ul></dd>
  </dl>
<div class="fields">      <p><strong>To Do:</strong>
        consider revising this API. It may be better to do away with the format
    keyword and to use separate methods instead. Another possibility would 
    be to make this and similar methods class methods which return a 
    Bibliography object.
      </p>
</div></td></tr></table>
</div>
<a name="load_from_string"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">load_from_string</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">string</span>,
        <span class="sig-arg">format</span>=<span class="sig-default">'bibtex'</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.load_from_string">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Loads bibliography entries from a string in the specified format.</p>
  <p>Loaded BibEntries are appended to any BibEntries already in the 
  Bibliography.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>string</code></strong> (<code>str</code>) - The string from which to load the records.</li>
        <li><strong class="pname"><code>format</code></strong> (<code>str</code>) - The format in which the bibliographic data has been serialized.</li>
    </ul></dd>
    <dt>Returns: <code>None</code></dt>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'><a href="bkn.bibtex.error.FormatNotSupportedError-class.html">FormatNotSupportedError</a></strong></code> - A FormatNotSupportedError will be raised if the supplied format is 
        not supported.</li>
    </ul></dd>
  </dl>
<div class="fields">      <p><strong>To Do:</strong>
        consider revising this API. It may be better to do away with the format
    keyword and to use separate methods instead.
      </p>
</div></td></tr></table>
</div>
<a name="load_from_dlist"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">load_from_dlist</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">dlist</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.load_from_dlist">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Loads bibliography entries from a list of dictionaries.</p>
  <p>This method will look for dictionaries of 'bibtype' and 'citekey' to 
  assign those parts of the entry. An error will be raised if either of 
  these keys are missing.</p>
  <p>Loaded BibEntries are appended to any BibEntries already in the 
  Bibliography.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>dlist</code></strong> (<code>list</code> of <code>dict</code>s) - a list of dictionaries, with each dictionary corresponding to a 
          record.</li>
    </ul></dd>
    <dt>Returns: <code>None</code></dt>
  </dl>
</td></tr></table>
</div>
<a name="_load_from_bibtex_file"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_load_from_bibtex_file</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">file</span>,
        <span class="sig-arg">encoding</span>=<span class="sig-default">'utf-8'</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography._load_from_bibtex_file">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Loads records into this bibliography from the specified BibTeX 
  file.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>file</code></strong> (<code>str</code>, <code>unicode</code>, or <code>file</code>) - the path to the file or a file object.</li>
    </ul></dd>
    <dt>Returns: <code>None</code></dt>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>ParserSyntaxError</strong></code> - if there is an error in the BibTeX file.</li>
    </ul></dd>
  </dl>
<div class="fields">      <p><strong>To Do:</strong>
        the encoding keyword is not currently handled correctly if 
    <code>file</code> is a <code>File</code> object (as opposed to a file 
    name). It may be best to split these two approaches into distinct 
    methods.
      </p>
</div></td></tr></table>
</div>
<a name="_load_from_BibJSON_file"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_load_from_BibJSON_file</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">file</span>,
        <span class="sig-arg">encoding</span>=<span class="sig-default">'utf-8'</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography._load_from_BibJSON_file">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Loads records into this bibliography from the specified BibJSON 
  file.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>file</code></strong> (<code>str</code>, <code>unicode</code>, or <code>file</code>) - the path to the file or a file object.</li>
    </ul></dd>
    <dt>Returns: <code>None</code></dt>
  </dl>
<div class="fields">      <p><strong>Warning:</strong>
        This method uses the simpleparse module which does not support 
        Unicode strings. For this reason strings passed to this method will
        be converted to the us-ascii encoding before being parsed.
      </p>
      <p><strong>To Do:</strong>
        the encoding keyword is not currently handled correctly if 
    <code>file</code> is a <code>File</code> object (as opposed to a file 
    name). It may be best to split these two approaches into distinct 
    methods.
      </p>
</div></td></tr></table>
</div>
<a name="_load_from_BibJSON_string"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_load_from_BibJSON_string</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">string</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography._load_from_BibJSON_string">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Loads records into this bibliography from a string in BibJSON 
  format.</p>
  <p>This method also updates the bibliography's metadata using the 
  attributes of the supplied BibJSON's dataset module.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>string</code></strong> (<code>str</code>) - BibJSON data</li>
    </ul></dd>
    <dt>Returns: <code>None</code></dt>
  </dl>
<div class="fields">      <strong>To Do:</strong>
      <ul class="nomargin-top">
        <li>
        add support for linkage?
        </li>
        <li>
        add support for schema?
        </li>
      </ul>
</div></td></tr></table>
</div>
<a name="_load_from_bibtex_string"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_load_from_bibtex_string</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">string</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography._load_from_bibtex_string">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Loads records into this bibliography from a string in BibTeX 
  format.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>string</code></strong> (<code>str</code>) - BibTeX data</li>
    </ul></dd>
    <dt>Returns: <code>None</code></dt>
  </dl>
<div class="fields">      <p><strong>Warning:</strong>
        This method uses the simpleparse module which does not support 
        Unicode strings. For this reason strings passed to this method will
        be converted to the us-ascii encoding before being parsed.
      </p>
</div></td></tr></table>
</div>
<a name="__len__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__len__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Length operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.__len__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns the number of records in this bibliography.</p>
  <dl class="fields">
    <dt>Returns: <code>int</code></dt>
        <dd>the number of records in this bibliography.</dd>
  </dl>
</td></tr></table>
</div>
<a name="__iter__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__iter__</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.__iter__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns an iterator over this bibliography's records.</p>
  <dl class="fields">
    <dt>Returns: <code>iterator</code></dt>
        <dd>an iterator over this bibliography's records.</dd>
  </dl>
</td></tr></table>
</div>
<a name="sort"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">sort</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">comparison</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.sort">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Sort this bibliography, using the supplied comparison.</p>
  <p>Some useful comparison functions can be found in the <a 
  href="bkn.bibtex.comparisons-module.html" class="link">comparisons</a> 
  module.</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">from</span> bkn.bibtex.comparisons <span class="py-keyword">import</span> compare_entries
<span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">from</span> bkn.bibtex.bibliography <span class="py-keyword">import</span> Bibliography
<span class="py-prompt">&gt;&gt;&gt; </span>bib = Bibliography(file=<span class="py-string">'dataset.bib'</span>)
<span class="py-prompt">&gt;&gt;&gt; </span>bib.sort(compare_entries)</pre>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>comparison</code></strong> (<code>function</code>) - a comparison function taking two arguments which should return a 
          negative or positive number depending on whether the first 
          argument should come before or after the second argument.</li>
    </ul></dd>
    <dt>Returns: <code>None</code></dt>
  </dl>
</td></tr></table>
</div>
<a name="__getitem__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getitem__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>)</span>
    <br /><em class="fname">(Indexing operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.__getitem__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Allows you to access a record using bracket notation.</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>bib[<span class="py-string">'id:23'</span>]</pre>
  <p><code>key</code> may be either an integer, in which case it refers to 
  the position of a record in the bibliography, or it may be a string, in 
  which case it refers to the local id of the record to be retrieved.</p>
  <p>Note that while you may use the bracket notation to access records you
  may not set records this way, so:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>bib[0] = Record(record_data)</pre>
  <p>will not work.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>key</code></strong> (<code>int</code> or <code>str</code>) - either the position of the record to be retrieved or the local id
          of the record to be retrieved.</li>
    </ul></dd>
    <dt>Returns: <a href="bkn.bibtex.bibliography.Record-class.html" 
      class="link">Record</a></dt>
        <dd>the requested record</dd>
  </dl>
</td></tr></table>
</div>
<a name="append"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">append</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">record</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.append">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>A synomnym for add_record().</p>
  <dl class="fields">
    <dt>Returns: <a href="bkn.bibtex.bibliography.Record-class.html" 
      class="link">Record</a></dt>
  </dl>
<div class="fields">      <p><strong>See Also:</strong>
        <a 
        href="bkn.bibtex.bibliography.Bibliography-class.html#add_record" 
        class="link">add_record()</a>
      </p>
</div></td></tr></table>
</div>
<a name="remove"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">remove</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">record</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.remove">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>A synonym for remove_record().</p>
  <dl class="fields">
    <dt>Returns: <code>None</code></dt>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'><a href="bkn.bibtex.error.RecordNotFoundError-class.html">RecordNotFoundError</a></strong></code> - if the specified record cannot be found in this Bibliography.</li>
    </ul></dd>
  </dl>
<div class="fields">      <p><strong>See Also:</strong>
        <a 
        href="bkn.bibtex.bibliography.Bibliography-class.html#remove_record"
        class="link">remove_record</a>
      </p>
</div></td></tr></table>
</div>
<a name="add_record"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_record</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">record</span>,
        <span class="sig-arg">id</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.add_record">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Adds a copy of the supplied Record to this bibliography.</p>
  <p>If the keyword paramater <code>id</code> is supplied it will be used 
  as the local id for the new record. The original record is left 
  unchanged.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>record</code></strong> (<a href="bkn.bibtex.bibliography.Record-class.html" 
          class="link">Record</a>) - the Record to add</li>
    </ul></dd>
    <dt>Returns: <a href="bkn.bibtex.bibliography.Record-class.html" 
      class="link">Record</a></dt>
        <dd>the new Record</dd>
  </dl>
<div class="fields">      <p><strong>Note:</strong>
        It is important to remember that a the supplied Record will not be 
        added to the Bibliography; a copy of the Record will be added 
        instead. This is necessary because a given Record can be a member 
        of one and only one Bibliography.
      </p>
</div></td></tr></table>
</div>
<a name="remove_record"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">remove_record</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">record</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.remove_record">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Removes the supplied Record from the bibliography.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>record</code></strong> (Record) - the record to be removed</li>
    </ul></dd>
    <dt>Returns: <code>None</code></dt>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'><a href="bkn.bibtex.error.RecordNotFoundError-class.html">RecordNotFoundError</a></strong></code> - if the specified record cannot be found in this Bibliography.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="record_from_id"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">record_from_id</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">local_id</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.record_from_id">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns the Record with the given local id.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>local_id</code></strong> (str) - the local id of a record in this bibliography.</li>
    </ul></dd>
    <dt>Returns: <a href="bkn.bibtex.bibliography.Record-class.html" 
      class="link">Record</a></dt>
        <dd>the Record with the given local id</dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'><a href="bkn.bibtex.error.RecordNotFoundError-class.html">RecordNotFoundError</a></strong></code> - if no Record in this Bibliography has the specified local id.</li>
    </ul></dd>
  </dl>
<div class="fields">      <p><strong>Warning:</strong>
        Do not confuse this method with the module level method <a 
        href="bkn.bibtex.bibliography-module.html#record_from_id" 
        class="link">record_from_id()</a>.
      </p>
</div></td></tr></table>
</div>
<a name="resolve_reference"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">resolve_reference</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">ref</span>,
        <span class="sig-arg">resolve_local_refs_from_memory</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.resolve_reference">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Attempts to resolve the given reference, returning the applicable 
  Record if available.</p>
  <p>Global references will always be resolved over the network or from 
  local files, as appropriate. Local references will be resolved from the 
  version of the Bibliography in memory if resolve_local_refs_from_memory 
  is True (the default). Otherwise they will be converted to and resolved 
  like any other global reference.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>ref</code></strong> (str) - The reference to be resolved. Global references should begin with
          '@@' and local references should begin with '@'.</li>
        <li><strong class="pname"><code>resolve_local_refs_from_memory</code></strong> (bool) - whether or not to resolve local references using the version of 
          the Bibliography in memory.</li>
    </ul></dd>
    <dt>Returns: <a href="bkn.bibtex.bibliography.Record-class.html" 
      class="link">Record</a> or <code>None</code></dt>
        <dd>the requested Record or None if the reference is cannot be 
          resolved.</dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'><a href="bkn.bibtex.error.InvalidReferenceError-class.html">InvalidReferenceError</a></strong></code> - if the requested reference was invalid.</li>
        <li><code><strong class='fraise'><a href="bkn.bibtex.error.RecordNotFoundError-class.html">RecordNotFoundError</a></strong></code> - if the requested reference can be resolved, and a response is 
        retrieved, but the response does not contain the requested 
        resource.</li>
        <li><code><strong class='fraise'><a href="bkn.bibtex.error.InvalidResponseError-class.html">InvalidResponseError</a></strong></code> - if the requested reference can be resolved, and a response is 
        retrieved, but the response is invalid.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="fullref"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">fullref</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">ref</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.fullref">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Takes a reference, local or global, and returns a global 
  reference.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>ref</code></strong> (<code>str</code>) - a reference</li>
    </ul></dd>
    <dt>Returns: <code>str</code></dt>
        <dd>a global reference</dd>
  </dl>
<div class="fields">      <p><strong>Note:</strong>
        a reference is simply a string composed of '@' plus the local id of
        a record or '@@' plus the global id of a record.
      </p>
</div></td></tr></table>
</div>
<a name="get_records_same_as"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_records_same_as</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">id</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.get_records_same_as">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Identifies records which represent the same thing by following same-as
  assertions.</p>
  <p>Same-as assertions may be included in a record by providing an 
  attribute with the name &quot;same-as&quot; and a list of references as 
  the value. For example, the same-as assertion in the this BibJSON 
  record:</p>
<pre class="literalblock">
   {
       &quot;id&quot; : &quot;003&quot;,
       &quot;type&quot; : &quot;article&quot;,
       &quot;title&quot; : &quot;Duplicate Detection in Underwater Steelworks&quot;,
       &quot;author&quot; : &quot;Mandavis Grazy&quot;,
       &quot;same-as&quot; : [&quot;@001&quot;,&quot;@002&quot;,&quot;@@http://external.data/978&quot;]
   }
</pre>
  <p>indicates that the given record represents the same article as is 
  represented by record 001 and 002 in this dataset as well as the record 
  with full id http://external.data/978 which may be in an external 
  dataset.</p>
  <p>Same-as assertions are symmetric. This method attempts to respect 
  that, but same-as assertions must be indicated somewhere within a dataset
  in order to be observed by this method, i.e. assertions that only occur 
  in external datasets will not be followed.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>id</code></strong> (<code>str</code>) - the id of record to be considered.</li>
    </ul></dd>
    <dt>Returns: <code>list</code> of <a 
      href="bkn.bibtex.bibliography.Record-class.html" 
      class="link">Records</a></dt>
        <dd>a list of <a href="bkn.bibtex.bibliography.Record-class.html" 
          class="link">Records</a></dd>
  </dl>
<div class="fields">      <p><strong>Attention:</strong>
        this method takes the record in question's id as an argument, not 
        the record itself.
      </p>
</div></td></tr></table>
</div>
<a name="get_unique_id"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_unique_id</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">prefix</span>=<span class="sig-default">''</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.get_unique_id">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns a string for use as an id in this bibliography.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>prefix</code></strong> (<code>str</code>) - if provided, the id will begin with the given prefix</li>
    </ul></dd>
    <dt>Returns: <code>str</code></dt>
        <dd>a string which may be used as an id for a new record without 
          conflicting with existing records in this Bibliography.</dd>
  </dl>
<div class="fields">      <p><strong>To Do:</strong>
        update tests for this method (the prefix keyword is new)
      </p>
</div></td></tr></table>
</div>
<a name="to_bibjson"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">to_bibjson</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.to_bibjson">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns the BibJSON serialization of this Bibliography.</p>
  <dl class="fields">
    <dt>Returns: <code>str</code></dt>
        <dd>the BibJSON serialization of this Bibliography.</dd>
  </dl>
</td></tr></table>
</div>
<a name="to_bibtex"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">to_bibtex</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.to_bibtex">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns the BibTeX serialization of this Bibliography.</p>
  <dl class="fields">
    <dt>Returns: <code>str</code></dt>
        <dd>the BibTeX serialization of this Bibliography.</dd>
  </dl>
<div class="fields">      <p><strong>Warning:</strong>
        Bibliographies with any attribute values which are not strings or 
        integers may not be serialized in the BibTeX format.
      </p>
      <p><strong>To Do:</strong>
        write tests for this method.
      </p>
</div></td></tr></table>
</div>
<a name="set_id"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_id</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">id</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.set_id">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>The preferred way to set this bibliographies id. Other methods may 
  interfere with proper bibliography caching.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>id</code></strong> (str) - the new id for this Bibliography.</li>
    </ul></dd>
    <dt>Returns: <code>None</code></dt>
  </dl>
</td></tr></table>
</div>
<a name="add_bibtex_output"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_bibtex_output</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">style</span>=<span class="sig-default">'abbrv'</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.add_bibtex_output">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>For every record, adds a bibtex_out attribute whose contents is the 
  the result of running bibtex on the entry with specified style.</p>
  <p>A <code>bibtex_warnings</code> attribute is also added, which is a 
  list of any warnings generated by bibtex for an entry.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>style</code></strong> (str) - the BibTeX style to be used. The specified style must be 
          installed on your system.</li>
    </ul></dd>
    <dt>Returns: <code>None</code></dt>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'><a href="bkn.bibtex.error.ExternalError-class.html">ExternalError</a></strong></code> - if python can't find or run the bibtex executable.</li>
        <li><code><strong class='fraise'><a href="bkn.bibtex.error.ExternalError-class.html">ExternalError</a></strong></code> - if bibtex does not return the expected output.</li>
        <li><code><strong class='fraise'><a href="bkn.bibtex.error.BibTeXError-class.html">BibTeXError</a></strong></code> - if bibtex encounters an error.</li>
    </ul></dd>
  </dl>
<div class="fields">      <p><strong>To Do:</strong>
        this method should only attempt to create bibtex output for those 
    records which represent bibliographic items. (Records for authors, 
    institutions, and the like should be ignored.)
      </p>
</div></td></tr></table>
</div>
<a name="validate_record"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">validate_record</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">record</span>,
        <span class="sig-arg">raise_error</span>=<span class="sig-default">False</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.validate_record">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns True if the passed record is valid, otherwise returns 
  False.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>raise_error</code></strong> (<code>bool</code>) - if <code>True</code> then raise a InvalidRecordError instead of 
          returning.</li>
    </ul></dd>
    <dt>Returns: <code>bool</code></dt>
        <dd><code>True</code> if the passed record is valid, and 
          <code>False</code> otherwise.</dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'><a href="bkn.bibtex.error.InvalidRecordError-class.html">InvalidRecordError</a></strong></code> - if the record is invalid and <code>raise_error</code> is 
        <code>True</code></li>
    </ul></dd>
  </dl>
<div class="fields">      <p><strong>Note:</strong>
        currently this method only checks that the 'type' and 'id' 
        attributes are strings.
      </p>
      <p><strong>To Do:</strong>
        should check against this bibliography's schema
      </p>
</div></td></tr></table>
</div>
<a name="values_equal"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">values_equal</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">other</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.values_equal">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns true if this Bibliography has the same content as the given 
  Bibliography.</p>
  <p>Distinct Bibliographies will always compare as not equal. This method 
  may be used to compare Records based upon their content.</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>bib2 = <span class="py-builtin">copy</span>.deepcopy(bib1)
<span class="py-prompt">&gt;&gt;&gt; </span>bib1 == bib2
<span class="py-more">... </span>False
<span class="py-prompt">&gt;&gt;&gt; </span>bib1.values_equal(bib2)
<span class="py-more">... </span>True</pre>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>other</code></strong> (Bibliography) - the Bibliography to which this Bibliography should be compared.</li>
    </ul></dd>
    <dt>Returns: <code>bool</code></dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns an informal string representation of this record</p>
  <dl class="fields">
    <dt>Returns: <code>str</code></dt>
        <dd>The current implementation calls to_bibtex(). (This may change in
          future versions.</dd>
  </dl>
</td></tr></table>
</div>
<a name="__getattr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getattr__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>)</span>
    <br /><em class="fname">(Qualification operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="bkn.bibtex.bibliography-pysrc.html#Bibliography.__getattr__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Handles attribute access for deprecated attributes and methods.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> (str) - the name of the requested attribute.</li>
    </ul></dd>
    <dt>Returns: <code>object</code></dt>
  </dl>
<div class="fields">      <p><strong>Note:</strong>
        'attribute' in this context refers to a python attribute, not to a 
        BibJSON attribute.
      </p>
</div></td></tr></table>
</div>
<br />
<!-- ==================== INSTANCE VARIABLE DETAILS ==================== -->
<a name="section-InstanceVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="id_to_record_index"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">id_to_record_index</h3>
  <p>A dict mapping local ids to entries. Used for quick-lookup.</p>
  <dl class="fields">
    <dt>Type:</dt>
      <dd><code>dict</code></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="bkn.bibtex-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/bibkn/">bkn.bibtex</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Jul  4 23:10:58 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
